/**
 * 通用组件库
 * @description 项目中所有通用组件的统一导出文件
 * @author 系统
 * @date 2024
 */

// 导入所有通用组件
import EmptyState from './EmptyState.vue'
import Card from './Card.vue'
import Button from './Button.vue'
import List from './List.vue'
import Form from './Form.vue'
import Modal from './Modal.vue'

// 组件列表
const components = [
  EmptyState,
  Card,
  Button,
  List,
  Form,
  Modal
]

// 安装函数
const install = function(Vue) {
  components.forEach(component => {
    Vue.component(component.name, component)
  })
}

// 支持按需引入
export {
  EmptyState,
  Card,
  Button,
  List,
  Form,
  Modal,
  install
}

// 默认导出
export default {
  install,
  EmptyState,
  Card,
  Button,
  List,
  Form,
  Modal
}
